<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>委托单管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="/webpage/include/treeview.jsp" %>
	<%@include file="newPlanningList.js" %>
	<style type="text/css">
		/* 带复选框的下拉框 */
		ul li{
			list-style: none;
			padding:0px;
			margin: 0px;
		}

		.select_checkBox{
			border:0px solid red;
			position: relative;
			display:inline-block;


		}
		.chartQuota{
			height:23px;
			float:left;
			display:inline-block;
			border:0px solid black;
			position: relative;
		}

		.chartOptionsFlowTrend{
			z-index:300;
			background-color:white;
			border:1px solid gray;
			display:none;
			position: absolute;
			left:0px;
			top:23px;
			width:150px;
		}
		.chartOptionsFlowTrend ul{
			float:left;
			padding: 0px;
			margin: 5px;
		}
		.chartOptionsFlowTrend li{
			/* float:left; */
			display:block;
			position: relative;
			left:0px;
			margin: 0px;
			clear:both;
		}
		.chartOptionsFlowTrend li *{
			float:left;
		}
		a:-webkit-any-link {
			color: -webkit-link;
			text-decoration: underline;
			cursor: auto;
		}
		.chartQuota p a {
			float: left;
			height: 21px;
			outline: 0 none;
			border: 1px solid #ccc;
			line-height: 22px;
			padding: 0 5px;
			overflow: hidden;
			background: #eaeaea;
			color: #313131;
			text-decoration: none;
		}

		.chartQuota p {
			margin:0px;
			folat:left;
			overflow: hidden;
			height: 23px;
			line-height:24px;
			display: inline-block;
		}
		.chartOptionsFlowTrend p {
			height: 23px;
			line-height: 23px;
			overflow: hidden;
			position: relative;
			z-index: 2;
			background: #fefbf7;
			padding-top: 0px;
			display: inline-block;
		}
		.chartOptionsFlowTrend p a {
			border: 1px solid #fff;
			margin-left: 15px;
			color: #2e91da;
		}
	</style>
	<script type="text/javascript">
       function cs() {
           var result="";
           $("input[class='status']:checked").each(function(){
               result+=$(this).val()+'、';
           });
           if(result!=""){
               result=result.substring(0,result.lastIndexOf('、'));
           }
           $("#status").val(result);
       }


        $(function(){



            $(".select_checkBox").hover(function(){
                $(".chartOptionsFlowTrend").css("display","inline-block");
            },
				function(){
                $(".chartOptionsFlowTrend").css("display","none");
            });
        });
	</script>
</head>

<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">委托单列表</h3>
	</div>
	<div class="panel-body">
		<sys:message content="${message}"/>
	
	<!-- 搜索 -->
	<div class="accordion-group">
	<div id="collapseTwo" class="accordion-body collapse">
		<div class="accordion-inner">
			<form:form id="searchForm" modelAttribute="newPlanning" class="form form-horizontal well clearfix">
			 <%--<div class="col-xs-12 col-sm-6 col-md-4">--%>
				<%--<label class="label-item single-overflow pull-left" title="委托单状态：">委托单状态：</label>--%>
				<%--<form:input path="status" htmlEscape="false" maxlength="64"  class=" form-control"/>--%>
			<%--</div>--%>
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="状态：">单据状态：</label>
				<%--<select class="form-control"  multiple name="status" >--%>
					<%--<option value="" >请选择</option>--%>
					<%--<option value="已创建">已创建</option>--%>
					<%--<option value="已生成计划">已生成计划</option>--%>
					<%--<option value="已计费">已计费</option>--%>
				<%--</select>--%>
				<div class="select_checkBox">
					<div class="chartQuota">
						<p>
							<input id="status" class="form-control" name="status" hidefocus="true" placeholder="请选择指标"/>
						</p>

					</div><br>
					<div class="chartOptionsFlowTrend">
					<ul>
						<li ><input onclick="cs()"class="status" type="checkbox" value="已创建"><span>已创建</span>
						</li>
						<li class="status"><input onclick="cs()" class="status" type="checkbox" value="已生成计划"><span>已生成计划</span>
						</li>
						<li class="status"><input onclick="cs()"  class="status" type="checkbox" value="已计费"><span>已计费</span>
						</li>
					</ul>

				</div>
			</div>

				</div>

				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="状态：">计费状态：</label>
				<select class="form-control"  name="jf" >
					<option value="" >请选择</option>
					<option value="满足">满足</option>
					<option value="不满足">不满足</option>
				</select>

				</div>
				　
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="状态：">订单类型：</label>
					<select class="form-control" name="type" >
						<option value="" >请选择</option>
						<option value="销售订单">销售订单</option>
						<option value="调拨订单">调拨订单</option>
					</select>

				</div>
				　　
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="状态：">作业类型：</label>
					<select class="form-control" name="zylx" >
						<option value="" >请选择</option>
						<option value="常规">常规</option>
						<option value="整托">整托</option>
						<option value="倒短">倒短</option>
					</select>

				</div>
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="委托单号：">委托单号：</label>
				<form:input path="wtdh" htmlEscape="false" maxlength="64"  class=" form-control"/>
			</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="装运单号：">装运单号：</label>
					<form:input path="zydh" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>

				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="提货仓库：">提货仓库：</label>
				<sys:gridselect url="${ctx}/infor/takeAddress/data" id="deop" name="deop.id" value="" labelName="deop.store" labelValue=""
								title="选择提货仓库" cssClass="form-control required" fieldLabels="名称" fieldKeys="store" searchLabels="名称" searchKeys="name" ></sys:gridselect>

				<%--<form:input path="deop" htmlEscape="false" maxlength="64"  class=" form-control"/>--%>
				</div>
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="结算地：">结算地：</label>
				<sys:gridselect url="${ctx}/infor/settlement/data" id="jsd" name="jsd.id" value="" labelName="jsd.name" labelValue=""
								title="选择结算地" cssClass="form-control required" fieldLabels="名称" fieldKeys="name" searchLabels="名称" searchKeys="name" ></sys:gridselect>

				<%--<form:input path="jsd" htmlEscape="false" maxlength="64"  class=" form-control"/>--%>
				</div>
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="物料名称：">物料名称：</label>
				<sys:gridselect url="${ctx}/infor/goods/data" id="name" name="name.id" value="" labelName="name.name" labelValue=""
								title="选择物料" cssClass="form-control required" fieldLabels="名称" fieldKeys="name" searchLabels="名称" searchKeys="name" ></sys:gridselect>
				</div>
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="物料编码：">物料编码：</label>
				<form:input path="code" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				　　　　
				　　　　　
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="提货单号：">提货单号：</label>
				<form:input path="thdh" htmlEscape="false" maxlength="64"  class=" form-control"/>
			</div>
				　　　　
				　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="收货单位：">收货单位：</label>
				<form:input path="shdw" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>　　
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<div class="form-group">
					<label class="label-item single-overflow pull-left" title="下单日期：">&nbsp;下单日期：</label>
					<div class="col-xs-12">
						<div class='input-group date' id='date' >
							<input type='text'  name="date" class="form-control"  />
							<span class="input-group-addon">
			                       <span class="glyphicon glyphicon-calendar"></span>
			                   </span>
						</div>
					</div>
				</div>
				</div>
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<div class="form-group">
					<label class="label-item single-overflow pull-left" title="要求发货日期：">&nbsp;要求发货日期：</label>
					<div class="col-xs-12">
						<div class='input-group date' id='fhdate' >
			                   <input type='text'  name="fhdate" class="form-control"  />
			                   <span class="input-group-addon">
			                       <span class="glyphicon glyphicon-calendar"></span>
			                   </span>
			            </div>	
					</div>
				</div>
			</div>
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<div class="form-group">
					<label class="label-item single-overflow pull-left" title="要求到货日期：">&nbsp;要求到货日期：</label>
					<div class="col-xs-12">
						<div class='input-group date' id='dhdate' >
			                   <input type='text'  name="dhdate" class="form-control"  />
			                   <span class="input-group-addon">
			                       <span class="glyphicon glyphicon-calendar"></span>
			                   </span>
			            </div>	
					</div>
				</div>
			</div>
				　　　　
				　　　　　
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="结算吨位区间：">结算吨位区间：</label>
				<form:input path="width" htmlEscape="false" maxlength="64"  class=" form-control"/>
			</div>
				　　　
				　　　　　<div class="col-xs-6 col-sm-3 col-md-2">
			<div style="margin-top:26px">
			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
			 </div>
	    </div>	
	</form:form>
	</div>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div id="toolbar">
			<shiro:hasPermission name="tms:newPlanning:add">
				<a id="add" class="btn btn-primary" onclick="add()"><i class="glyphicon glyphicon-plus"></i> 新建</a>
			</shiro:hasPermission>
			<shiro:hasPermission name="tms:newPlanning:edit">
			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
	            	<i class="glyphicon glyphicon-edit"></i> 修改
	        	</button>
			</shiro:hasPermission>
			<shiro:hasPermission name="tms:newPlanning:del">
				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
	            	<i class="glyphicon glyphicon-remove"></i> 删除
	        	</button>
			</shiro:hasPermission>
		<button id="scjh" class="btn btn-primary" disabled onclick="scjh1()">
			生成计划
		</button>
		<button id="qxjh" class="btn btn-danger" disabled onclick="qxjh1()">
			取消计划
		</button>
		<button id="jf4" class="btn btn-success" disabled onclick="jf()">
			自动计费
		</button>
			<shiro:hasPermission name="tms:newPlanning:import">
				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
				<div id="importBox" class="hide">
						<form id="importForm" action="${ctx}/tms/newPlanning/import" method="post" enctype="multipart/form-data"
							 style="padding-left:20px;text-align:center;" ><br/>
							<input id="uploadFile" name="file" type="file" style="width:330px"/>导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！<br/>　　
							
							
						</form>
				</div>
			</shiro:hasPermission>
	        	<a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
					<i class="fa fa-search"></i> 检索
				</a>
		    </div>
		
	<!-- 表格 -->
	<table id="newPlanningTable"  class="table text-nowrap"  data-toolbar="#toolbar"></table>

    <!-- context menu -->
    <%--<ul id="context-menu" class="dropdown-menu">--%>
    	<%--<shiro:hasPermission name="tms:newPlanning:edit">--%>
        <%--<li data-item="edit"><a>编辑</a></li>--%>
        <%--</shiro:hasPermission>--%>
        <%--<shiro:hasPermission name="tms:newPlanning:del">--%>
        <%--<li data-item="delete"><a>删除</a></li>--%>
        <%--</shiro:hasPermission>--%>
        <%--<li data-item="action1"><a>取消</a></li>--%>
    <%--</ul>  --%>
	</div>
	</div>
	</div>
</body>
</html>